.class Les/fe0;
.super Ljava/lang/Object;
.source "OBEXAuthentication.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Les/fe0$b;,
        Les/fe0$a;
    }
.end annotation


# static fields
.field private static final a:[B


# direct methods
.method static constructor <clinit>()V
    .locals 3

    const/4 v0, 0x1

    new-array v0, v0, [B

    const/4 v1, 0x0

    const/16 v2, 0x3a

    aput-byte v2, v0, v1

    .line 1
    sput-object v0, Les/fe0;->a:[B

    return-void
.end method

.method static a(Les/le0;Les/le0;Les/rp0;)V
    .locals 2
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 23
    invoke-virtual {p0}, Les/le0;->e()Z

    move-result p1

    if-nez p1, :cond_0

    return-void

    .line 24
    :cond_0
    invoke-virtual {p0}, Les/le0;->a()Ljava/util/Enumeration;

    move-result-object p0

    invoke-interface {p0}, Ljava/util/Enumeration;->hasMoreElements()Z

    move-result p1

    if-eqz p1, :cond_2

    .line 25
    invoke-interface {p0}, Ljava/util/Enumeration;->nextElement()Ljava/lang/Object;

    move-result-object p0

    check-cast p0, [B

    .line 26
    new-instance p1, Les/fe0$a;

    invoke-direct {p1, p0}, Les/fe0$a;-><init>([B)V

    .line 27
    invoke-virtual {p1}, Les/fe0$a;->a()Ljava/lang/String;

    move-result-object p0

    .line 28
    invoke-virtual {p1}, Les/fe0$a;->c()Z

    move-result v0

    invoke-virtual {p1}, Les/fe0$a;->b()Z

    move-result v1

    .line 29
    invoke-interface {p2, p0, v0, v1}, Les/rp0;->a(Ljava/lang/String;ZZ)Les/vp0;

    move-result-object p0

    .line 30
    new-instance p2, Les/fe0$b;

    invoke-direct {p2}, Les/fe0$b;-><init>()V

    .line 31
    iget-object v0, p1, Les/fe0$a;->d:[B

    iput-object v0, p2, Les/fe0$b;->c:[B

    const-string v1, "got nonce"

    .line 32
    invoke-static {v1, v0}, Les/be0;->a(Ljava/lang/String;[B)V

    .line 33
    invoke-virtual {p1}, Les/fe0$a;->c()Z

    move-result p1

    const/4 v0, 0x0

    if-eqz p1, :cond_1

    .line 34
    invoke-virtual {p0}, Les/vp0;->b()[B

    throw v0

    .line 35
    :cond_1
    new-instance p1, Les/ee0;

    invoke-direct {p1}, Les/ee0;-><init>()V

    .line 36
    iget-object p2, p2, Les/fe0$b;->c:[B

    invoke-virtual {p1, p2}, Les/ee0;->a([B)V

    .line 37
    sget-object p2, Les/fe0;->a:[B

    invoke-virtual {p1, p2}, Les/ee0;->a([B)V

    .line 38
    invoke-virtual {p0}, Les/vp0;->a()[B

    throw v0

    :cond_2
    return-void
.end method

.method static a(Les/le0;Les/rp0;Les/wp0;Ljava/util/Vector;)Z
    .locals 7
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 1
    invoke-virtual {p0}, Les/le0;->f()Z

    move-result v0

    const/4 v1, 0x0

    if-nez v0, :cond_0

    return v1

    .line 2
    :cond_0
    invoke-virtual {p0}, Les/le0;->d()Ljava/util/Enumeration;

    move-result-object p0

    :goto_0
    invoke-interface {p0}, Ljava/util/Enumeration;->hasMoreElements()Z

    move-result v0

    if-eqz v0, :cond_7

    .line 3
    invoke-interface {p0}, Ljava/util/Enumeration;->nextElement()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, [B

    .line 4
    new-instance v2, Les/fe0$b;

    invoke-direct {v2}, Les/fe0$b;-><init>()V

    .line 5
    invoke-virtual {v2, v0}, Les/fe0$b;->a([B)V

    .line 6
    iget-object v0, v2, Les/fe0$b;->c:[B

    const-string v3, "got nonce"

    invoke-static {v3, v0}, Les/be0;->a(Ljava/lang/String;[B)V

    const/4 v0, 0x0

    .line 7
    invoke-virtual {p3}, Ljava/util/Vector;->elements()Ljava/util/Enumeration;

    move-result-object v3

    :cond_1
    invoke-interface {v3}, Ljava/util/Enumeration;->hasMoreElements()Z

    move-result v4

    if-eqz v4, :cond_2

    .line 8
    invoke-interface {v3}, Ljava/util/Enumeration;->nextElement()Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Les/fe0$a;

    .line 9
    iget-object v5, v4, Les/fe0$a;->d:[B

    iget-object v6, v2, Les/fe0$b;->c:[B

    invoke-static {v5, v6}, Les/fe0;->a([B[B)Z

    move-result v5

    if-eqz v5, :cond_1

    move-object v0, v4

    :cond_2
    if-eqz v0, :cond_6

    .line 10
    iget-object v0, v2, Les/fe0$b;->b:[B

    invoke-interface {p1, v0}, Les/rp0;->a([B)[B

    move-result-object v0

    if-eqz v0, :cond_5

    .line 11
    new-instance v3, Les/ee0;

    invoke-direct {v3}, Les/ee0;-><init>()V

    .line 12
    iget-object v4, v2, Les/fe0$b;->c:[B

    invoke-virtual {v3, v4}, Les/ee0;->a([B)V

    .line 13
    sget-object v4, Les/fe0;->a:[B

    invoke-virtual {v3, v4}, Les/ee0;->a([B)V

    .line 14
    invoke-virtual {v3, v0}, Les/ee0;->a([B)V

    .line 15
    invoke-virtual {v3}, Les/ee0;->a()[B

    move-result-object v0

    .line 16
    iget-object v3, v2, Les/fe0$b;->a:[B

    invoke-static {v3, v0}, Les/fe0;->a([B[B)Z

    move-result v3

    if-nez v3, :cond_4

    .line 17
    iget-object v3, v2, Les/fe0$b;->a:[B

    const-string v4, "got digest"

    invoke-static {v4, v3}, Les/be0;->a(Ljava/lang/String;[B)V

    const-string v3, "  expected"

    .line 18
    invoke-static {v3, v0}, Les/be0;->a(Ljava/lang/String;[B)V

    if-eqz p2, :cond_3

    .line 19
    iget-object v0, v2, Les/fe0$b;->b:[B

    invoke-virtual {p2, v0}, Les/wp0;->a([B)V

    goto :goto_0

    .line 20
    :cond_3
    new-instance p0, Ljava/io/IOException;

    const-string p1, "Authentication failure"

    invoke-direct {p0, p1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V

    throw p0

    :cond_4
    const/4 p0, 0x1

    return p0

    .line 21
    :cond_5
    new-instance p0, Ljava/io/IOException;

    const-string p1, "Authentication request failed, password is not supplied"

    invoke-direct {p0, p1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V

    throw p0

    .line 22
    :cond_6
    new-instance p0, Ljava/io/IOException;

    const-string p1, "Authentication response for unknown challenge"

    invoke-direct {p0, p1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V

    throw p0

    :cond_7
    return v1
.end method

.method static a([B[B)Z
    .locals 4

    const/4 v0, 0x0

    const/4 v1, 0x0

    :goto_0
    const/16 v2, 0x10

    if-ge v1, v2, :cond_1

    .line 39
    aget-byte v2, p0, v1

    aget-byte v3, p1, v1

    if-eq v2, v3, :cond_0

    return v0

    :cond_0
    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    :cond_1
    const/4 p0, 0x1

    return p0
.end method
